Target Selector
(Alteration, Enchantment/Charm, Metamagic)

Range:  20 feet per level
Components:  V, S, M
Duration:  Special
Casting Time:  2 rounds or 2
Area of Effect:  10 feet per level radius sphere
Saving Throw:  None or Negates

This spell is actually two spells. The first version is used for spells, the second for affecting creatures directly.
The first version has a casting time of two rounds. After this time the caster can choose up to one creature per 3 levels or up to 1 object per level (or a respective mixture of objects and creatures). There are two possible effects of this selection:
1) These creatures and objects can be completely unaffected by area-of-effect spells of fifth level or lower within the sphere of this spell, as long as these spells are cast by the caster of this spell. Thus, the wizard could cast this spell into an area (let's say in the throne room of his king) and protect his king from the area of effect of a fireball he is going to hurl at the opponents of the king without affecting the king at all.
2) These creatures could be affected first despite any contradicting reasons of Hit Dice, size, etc. which are given in the additionally cast spell. Thus, the caster could choose to use sleep and if he specifies the ogre captain first, then he would drop first (if the caster rolls good enough) and then his underling kobolds would go to sleep after him. This would still not allow a wizard to affect a creature with more than 4+3 HD with a normal sleep spell.
This spell is not mobile and it cannot be made permanent. Anyone not protected nor selected by this spell is affected normally by any spells cast by the caster of this spell.
The second version of this spell has a casting time of 2. It ensures that any non-magical missiles fired into the area of effect only hit their intended targets or they miss completely - but even if a missile is fired into the most chaotic melee, it still only hits its intended target or absolutely no-one, unless the caster cannot protect enough creatures with this spell. The number of creatures the caster can affect is one creature per 3 level. This version of the spell is mobile. If desired the caster can carry the spell around with him to protect his fellow fighters from being hit by stray shots or throws from his darts or daggers (those wizards are notoriously known for fumbling at the worst of times, which means, exactly then when our courageous fighter just starts to buckle under the onslaught of the opposing masses and he just has the necessary hit points to survive - barely - but then that stray fumble of 1 rerolls a critical backstab damage or something of that kind! So, wizards, carry this spell around active with you and be protected from the rage of your soon to be resurrected fighter companion...).
The material component is a lodestone of the size of a coin painted with red-and-gold target circles on it (one per creature or ten objects to be protected) costing approximately 10 gp per lodestone.

